package wqh.cfs2000;

/**
 * Created by devts on 2016/9/27.
 */
public class UpAnalysis {

    //系统类型
    public static String getSystemTypeChinese(byte type)
    {
        String str = null;
        switch (type)
        {
            case 1 : str = "火灾报警系统（类型1）";break;
            case 10 : str = "消防联动控制器";break;
            case 11 : str = "消火栓系统";break;
            case 12 : str = "自动喷水灭火系统（类型1）";break;
            case 13 : str = "气体灭火系统";break;
            case 14 : str = "水喷雾灭火系统（泵启动方式）";break;
            case 15 : str = "水喷雾灭火系统（压力容器启动方式）";break;
            case 16 : str = "泡沫灭火系统";break;
            case 17 : str = "干粉灭火系统";break;
            case 18 : str = "防烟排烟系统";break;
            case 19 : str = "防火门及卷帘系统";break;
            case 20 : str = "消防电梯";break;
            case 21 : str = "消防应急广播";break;
            case 22 : str = "消防应急照明和疏散指示系统";break;
            case 23 : str = "消防电梯";break;
            case 24 : str = "消防电话";break;
            case 100 : str = "火灾报警系统（类型2）";break;
            case 101 : str = "火灾报警系统（类型3）";break;
            case 102 : str = "火灾报警系统（类型4）";break;
            case 103 : str = "火灾报警系统（类型5）";break;
            case 104 : str = "火灾报警系统（类型6）";break;
            case 105 : str = "火灾报警系统（类型7）";break;
            case 106 : str = "火灾报警系统（类型8）";break;
        }
        return str;
    }

    //部件类型
    public static String getSensorTypeChinese(byte devType)
    {
        String ret = null;
        switch (devType)
        {
            case 0 : ret = "通用"; break;
            case 1 : ret = "火灾报警控制器";break;
            case 10 : ret = "可燃气体探测器";break;
            case 11 : ret = "点型可燃气体探测器";break;
            case 12 : ret = "独立式可燃气体探测器";break;
            case 13 : ret = "线型可燃气体探测器";break;
            case 16 : ret = "电气火灾监控报警器";break;
            case 17 : ret = "剩余电流式电气火灾监控探测器";break;
            case 18 : ret = "测温式电气火灾监控探测器";break;
            case 21 : ret = "探测回路";break;
            case 22 : ret = "火灾显示盘";break;
            case 23 : ret = "手动火灾报警按钮";break;
            case 24 : ret = "消火栓按钮";break;
            case 25 : ret = "火灾探测器";break;
            case 30 : ret = "感温火灾探测器";break;
            case 31 : ret = "点型感温火灾探测器";break;
            case 32 : ret = "点型感温火灾探测器（S型）";break;
            case 33 : ret = "点型感温火灾探测器（R型）";break;
            case 34 : ret = "线型感温火灾探测器";break;
            case 35 : ret = "线型感温火灾探测器（S型）";break;
            case 36 : ret = "线型感温火灾探测器（R型）";break;
            case 37 : ret = "光纤感温火灾探测器";break;
            case 40 : ret = "感烟火灾探测器";break;
            case 41 : ret = "点型离子感烟火灾探测器";break;
            case 42 : ret = "点型光电感烟火灾探测器";break;
            case 43 : ret = "线型光束感烟火灾探测器";break;
            case 44 : ret = "吸气式感烟火灾探测器";break;
            case 50 : ret = "复合式火灾探测器";break;
            case 51 : ret = "复合式感烟感温火灾探测器";break;
            case 52 : ret = "复合式感光感温火灾探测器";break;
            case 53 : ret = "复合式感光感烟火灾探测器";break;
            case 61 : ret = "紫外火焰探测器";break;
            case 62 : ret = "红外火焰探测器";break;
            case 69 : ret = "感光火灾探测器";break;
            case 74 : ret = "气体探测器";break;
            case 78 : ret = "图像摄像方式火灾探测器";break;
            case 79 : ret = "感声火灾探测器";break;
            case 81 : ret = "气体灭火控制器";break;
            case 82 : ret = "消防电气控制装置";break;
            case 83 : ret = "消防控制室图形显示装置";break;
            case 84 : ret = "模块";break;
            case 85 : ret = "输入模块";break;
            case 86 : ret = "输出模块";break;
            case 87 : ret = "输入/输出模块";break;
            case 88 : ret = "中继模块";break;
            case 91 : ret = "消防水泵";break;
            case 92 : ret = "消防水箱";break;
            case 95 : ret = "喷淋泵";break;
            case 96 : ret = "水流指示器";break;
            case 97 : ret = "信号阀";break;
            case 98 : ret = "报警阀";break;
            case 99 : ret = "压力开关";break;
            case 101 : ret = "阀驱动装置";break;
            case 102 : ret = "防火门";break;
            case 103 : ret = "防火阀";break;
            case 104 : ret = "通风空调";break;
            case 105 : ret = "泡沫液泵";break;
            case 106 : ret = "管网电磁阀";break;
            case 111 : ret = "防烟排烟风机";break;
            case 113 : ret = "排烟防火阀";break;
            case 114 : ret = "常闭送风口";break;
            case 115 : ret = "排烟口";break;
            case 116 : ret = "电控挡烟垂壁";break;
            case 117 : ret = "防火卷帘控制器";break;
            case 118 : ret = "防火门监控器";break;
            case 121 : ret = "报警装置";break;
        }
        return ret;
    }

    //部件状态,系统类型1
    public static String getSensorStatusChineseSystemType_1(short status)
    {
        String str = null;
        switch (status)
        {
            case 1 : str = "正常状态";break;
            case 2 : str = "火警";break;
            case 4 : str = "故障";break;
            case 8 : str = "屏蔽（隔离）";break;
            case 16 : str = "监管";break;
            case 32 : str = "启动（开启）";break;
            case 64 : str = "反馈";break;
            case 128 : str = "延时状态";break;
            case 256 : str = "电源故障（欠压）";break;
        }
        return str;
    }

    //部件状态,系统类型100
    public static String getSensorStatusChineseSystemType_100(short status)
    {
        String str = null;
        switch (status)
        {
            case 1 : str = "测试状态";break;
            case 2 : str = "火警恢复";break;
            case 4 : str = "故障恢复";break;
            case 8 : str = "取消屏蔽（释放）";break;
            case 16 : str = "监管恢复";break;
            case 32 : str = "停动（关闭）";break;
            case 64 : str = "反馈恢复";break;
            case 128 : str = "延时结束";break;
            case 256 : str = "电源恢复";break;
        }
        return str;
    }

    //部件状态,系统类型101
    public static String getSensorStatusChineseSystemType_101(short status)
    {
        String str = null;
        switch (status)
        {
            case 1 : str = "探头测试";break;
            case 2 : str = "确认火警";break;
            case 4 : str = "自动火警（有人）";break;
            case 8 : str = "离线";break;
            case 32 : str = "动作";break;
            case 64 : str = "预警";break;
            case 128 : str = "报警";break;
        }
        return str;
    }

    //部件状态,系统类型102
    public static String getSensorStatusChineseSystemType_102(short status)
    {
        String str = null;
        switch (status)
        {
            case 1 : str = "测试结束";break;
            case 2 : str = "误报";break;
            case 4 : str = "火警超时（有人）";break;
            case 8 : str = "离线恢复";break;
            case 32 : str = "停止";break;
            case 64 : str = "预警恢复";break;
            case 256 : str = "停用";break;
            case 512 : str = "恢复";break;
            case 1024 : str = "应答";break;
        }
        return str;
    }

}
